<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <body>
    <script>
        var obj = {};
        obj.name = "张三";
        obj.age = 18;
        obj.sex = "男";
        obj.say = function () {
            console.log("你好");
        }
        console.log(obj.name);
        console.log(obj.age);
        console.log(obj.sex);
        obj.say();

    </script>
</body>

</html>